package com.zhang;

import com.streamxhub.streamx.common.util.JsonUtils;
import com.streamxhub.streamx.flink.connector.kafka.bean.KafkaRecord;
import com.streamxhub.streamx.flink.connector.kafka.source.KafkaJavaSource;
import com.streamxhub.streamx.flink.core.StreamEnvConfig;
import com.streamxhub.streamx.flink.core.scala.StreamingContext;

/**
 * @title:
 * @author: zhangyifan
 * @date: 2022/6/25 18:18
 */
public class Demo01 {
    public static void main(String[] args) {
        StreamEnvConfig envConfig = new StreamEnvConfig(args, null);

        StreamingContext context = new StreamingContext(envConfig);
        context.setParallelism(1);

        context
                .socketTextStream("localhost", 9999, ' ', 1000L)
                .print();


        context.start();
    }
}
